<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript" src="/js/ChinesePY.js"></script>
    <script type="text/javascript" src="/js/ping2.js"></script>

</head>
<body>
<form class="layui-form" lay-filter="roleForm" id="add_pharme_form" action="" style="padding:15px 10px;" name="frm">
    <input type="hidden" name="id">
    <div class="layui-form-item">
        <label class="layui-form-label">药名</label>
        <div class="layui-input-block">
            <input    type="text" name="pName" lay-filter="yaopin" id="yaopin" lay-filter="yaopin" value="" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">检索名</label>
        <div class="layui-input-block">
            <!--<span id="pym"></span>-->

            <input type="text"  name="ping" required  lay-verify="required"  autocomplete="off"   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">药品类别</label>
        <div class="layui-input-block">
            <select name="ptype">
                <option>消炎药</option>
                <option>胃药</option>
                <option>感冒药</option>
            </select>
            <!--<input type="text"  id="" name="ptype" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">-->
        </div>


    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">标准来源</label>
        <div class="layui-input-block">
            <input type="text" name="pin" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">页码</label>
        <div class="layui-input-block">
            <input type="text" name="yeima" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">来源</label>
        <div class="layui-input-block">
            <input type="text" name="text" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>

<script>


    $(function () {
        $(":text[name='pName']").bind("blur",function () {
            var temp = getPinYinFirstCharacter($(this).val());

            $("input[name='ping']").val(temp);
        })
    })
</script>
    <script>
        layui.form.render();
    </script>


</form>
</body>
</html>